<%@ page contentType="text/html;charset=utf-8"%>


<%
        //使session失效
        session.invalidate();
    
	    //清空cookie，保留2周操作将失效
	    /*Cookie[] cookies=request.getCookies();
		 if(cookies!=null){   
		     for(int   i=0;i<cookies.length;i++){
		     String sp = cookies[i].getName();
		     if(sp!=null&&"userinfologinoper".indexOf(sp)>=0) {   
		          cookies[i].setMaxAge(0);   
		          cookies[i].setValue(null);
		          response.addCookie(cookies[i]);   
		      }   
		    }    
		} */
		Cookie c1 = new Cookie("userinfo", null);
		Cookie c2 = new Cookie("loginoper", null);
		c1.setMaxAge(0);
		c1.setPath("/student");   
		c2.setMaxAge(0);
		c2.setPath("/student");   
		response.addCookie(c1);
		response.addCookie(c2);
    

    //response.sendRedirect("../login.jsp");
    
	out.print("<script type=text/javascript>window.location.reload();</script>");
 
//<html><body>
//<script type="text/javascript">window.location.reload();</script>
//</body></html>
%>